/* eslint-disable @typescript-eslint/no-explicit-any */
import { InjectOptions, InjectionToken, Injector, Type } from "@angular/core";
import { InternalInjectFlags } from "@angular/core/chrome_dev_tools_performance";
import { LView, TNode } from "@angular/core/discovery";

declare interface InjectedService {
  /**
   * DI token of the Service that is injected
   */
  token?: Type<unknown> | InjectionToken<unknown>;
  /**
   * Value of the injected service
   */
  value: unknown;
  /**
   * Flags that this service was injected with
   */
  flags?: InternalInjectFlags | InjectOptions;
  /**
   * Injector that this service was provided in.
   */
  providedIn?: Injector;
  /**
   * In NodeInjectors, the LView and TNode that serviced this injection.
   */
  injectedIn?: {
    lView: LView;
    tNode: TNode;
  };
  factory?: (...args: any[]) => InjectedService;
}
function g(e: InjectedService) {
  return {
    token: e.token,
    providedIn: e.providedIn || null,
    factory: e.factory,
    value: void 0,
  };
}

class t implements InjectedService {
  // factory
  static ɵfac = function (a) {
    return new (a || t)();
  } as (a: any) => InjectedService;

  value: any;

  // provide
  static ɵprov = g({
    token: t,
    factory: t.ɵfac,
    value: undefined,
  });
}
